package com.sz.biz.common.base.service;

import com.sz.biz.common.base.entity.ExchangeRate;
import com.sz.biz.common.base.dto.ExchangeRateDto;
import com.sz.common.base.dto.QResultDto;

import java.util.Date;
import java.util.List;

/**
 * Function: ExchangeRateService <br>
 * Author: xutao <br>
 * Date: 2016-1-21 14:25:00
 */
public interface ExchangeRateService {
    /**
     * 新增货币汇率
     *
     * @param exchangeRateDto
     * @return
     * @throws Exception
     */
    int addCurrencyRoe(ExchangeRateDto exchangeRateDto);

    /**
     * 修改货币汇率
     *
     * @param exchangeRateDto
     * @return
     * @throws Exception
     */
    int updateCurrencyRoe(ExchangeRateDto exchangeRateDto);

    /**
     * 删除指定货币汇率
     *
     * @param listId
     * @return
     * @throws Exception
     */
    int deleteCurrencyRoe(List<Integer> listId);

    int batchDeleteExchangeRate(List<Integer> listIds);

    /**
     * 查找指定货币汇率信息
     *
     * @param sourceCurrency:本币 destCurrency：辅币 查询关键字:q pageIndex:页码 pageSize：页大小
     * @return
     * @throws Exception
     */
    QResultDto findCurrencyRoe(String sourceCurrency, String destCurrency, Date beginTime, Date endTime, String q, int pageIndex, int pageSize,
                               String sortName, boolean isAsc, String language);

    /**
     * 获取所有汇率中的最新汇率列表
     *
     * @param
     */
    QResultDto getLatestExchangeRateList(String sourceCurrency, String destCurrency, String q, int pageIndex, int pageSize,
                                         String sortName, boolean isAsc, String language);


    /**
     * 获取某个时间的汇率
     * @param sourceCurrency
     * @param destCurrency
     * @param date
     * @return
     */
    ExchangeRate findCurrencyRoeByDate(String sourceCurrency, String destCurrency, Date date);
}
